<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>Document</title>
    <link rel="stylesheet" href="../../css/api.css">
    <link rel="stylesheet" href="../../css/news.css">
    <link rel="stylesheet" href="../../css/login.css">
    <style>
        .login-bg {
            padding: 10px 0;
            width: 100vw;
        }
    </style>
</head>

<body>
    <div class="login-bg" id="view" v-cloak>
        <div class="wrap">
            <ul class="input-wrap w-bg">
                <li class="li ali-name">
                    <span class="name">{{escape_a}}名字</span>
                    <input type="text" :placeholder="'请输入'+escape_a+'名字'" v-model="ffInfo.zhifuname">
                </li>
                <li class="li ali-num">
                    <span class="name">{{escape_a}}账号</span>
                    <input type="text" :placeholder="'请输入'+escape_a+'账号'" v-model="ffInfo.zhifucount">
                </li>
            </ul>
            <button class="new-btn" tapmode onclick="submit()">确认</button>
        </div>
    </div>
</body>
<script src="../../script/api.js"></script>
<script src="../../script/jquery.js"></script>
<script src="../../script/ffkj.js"></script>
<script src="../../script/keyboard.js"></script>
<script src="../../script/vue.js"></script>
<script>
    var view = new Vue({
        el: '#view',
        data: {
            ffInfo: {},
            escape_a: escape_a
        }
    })
    apiready = function() {
        _getUser(function(ret) {
            view.ffInfo = ret.result;
            console.log(JSON.stringify(ret))
            $('.phone input').val(ret.result.phone);
        })
    }

    // 下一步
    function submit() {
        var phone = $.trim($('.phone input').val());
        var code = $.trim($('.code input').val());
        var aliName = $.trim(view.ffInfo.zhifuname);
        var aliNum = $.trim(view.ffInfo.zhifucount);
        if (!aliName) {
            _msg(escape_a + '名字未填写');
            return;
        }
        if (!aliNum) {
            _msg(escape_a + '账号未填写');
            return;
        }
        var userid = $api.getStorage('userid');
        _ajax('home/Withdraw/bangZ?userid=' + userid + '&zhifuname=' + aliName + '&zhifucount=' + aliNum, function(ret, err) {
            if (ret && ret.code == 200) {
                _send('pay_refresh');
                _msg('设置成功');
                timerWin();
            } else {
                _msg('设置失败');
            }
        })

    }
</script>

</html>